import React from 'react'
import { Navigate } from 'react-router-dom'
const Home = React.lazy(() => import('../views/home'))
const Car = React.lazy(() => import('../views/car'))
const Detail = React.lazy(() => import('../views/detail'))

export const routes = [
    {
        path: '/home',
        element: <Home></Home>

    },
    {
        path: '/car',
        element: <Car></Car>

    },
    {
        path: '/detail/:id',
        element: <Detail></Detail>
    },
    {
        path: '/',
        element: <Navigate to="/home"></Navigate>
    }
]